def selection_sort(sort_list):
    for fillslot in range(len(sort_list) - 1, 0, -1):
        position_of_max = 0
        for location in range(1, fillslot+1):
            if sort_list[location] > sort_list[position_of_max]:
                position_of_max = location

        sort_list[fillslot], sort_list[position_of_max] = sort_list[position_of_max], sort_list[fillslot]


if __name__ == '__main__':
    sort_list = [1, 222, 4, 45, 67, 25, 12]
    selection_sort(sort_list)
    print(sort_list)